package com.peas.platform.common.core.feign;

import com.peas.platform.common.core.dto.ResponseDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "peas-module-sys-core", contextId = "root")
public interface PeasModuleSysCoreFeign {

    @PostMapping("/api/v1/invoke/add")
    ResponseDto<Integer> addInvoke(@RequestBody Map<String, Object> data);

    @PostMapping("/api/v1/call/add")
    ResponseDto<Integer> addCall(@RequestBody Map<String, Object> data);

    @PostMapping("/api/v1/visit/add")
    ResponseDto<Integer> addVisit(@RequestBody Map<String, Object> data);

    @PostMapping("/api/v1/aspect/add")
    ResponseDto<Integer> addAspect(@RequestBody Map<String, Object> data);

    @PostMapping("/api/v1/recycle/add")
    ResponseDto<Integer> addRecycle(@RequestBody Map<String, Object> data);

    @PostMapping("/api/v1/sequence/add")
    ResponseDto<Integer> addSequence(@RequestBody Map<String, Object> data);

    @PostMapping("/api/v1/rocketmq/add")
    ResponseDto<Integer> addRocketmq(@RequestBody Map<String, Object> data);

    @PostMapping("/api/v1/kafka/add")
    ResponseDto<Integer> addKafka(@RequestBody Map<String, Object> data);

    @PostMapping("/api/v1/rabbitmq/add")
    ResponseDto<Integer> addRabbitmq(@RequestBody Map<String, Object> data);

    @PostMapping("/api/v1/schedule/add")
    ResponseDto<Integer> addSchedule(@RequestBody Map<String, Object> data);

    @GetMapping("/api/v1/sequence-ex/getMaxSequenceInc")
    ResponseDto<Long> getMaxSequenceInc(@RequestParam("business") String business,
                                        @RequestParam("service") String service,
                                        @RequestParam("model") String model,
                                        @RequestParam("prefix") String prefix);
}
